﻿

<!--header-e-->
<div id="myCarousel" class="carousel slide p header-tp tpshop2_0_carousel">
    <script type="text/javascript">
        $.fn.imgtransition = function (o) {
            var defaults = {
                speed: 5000,
                animate: 1000
            };
            o = $.extend(defaults, o);
            return this.each(function () {
                var arr_e = $("li", this);
                arr_e.css({position: "absolute"});
                arr_e.parent().css({margin: "0", padding: "0", "list-style": "none", overflow: "hidden"});

                function shownext() {
                    var active = arr_e.filter(".active").length ? arr_e.filter(".active") : arr_e.first();
                    var next = active.next().length ? active.next() : arr_e.first();
                    active.css({"z-index": 9});
                    next.css({
                        opacity: 0.0,
                        "z-index": 10
                    }).addClass('active').animate({opacity: 1.0}, o.animate, function () {
                        active.removeClass('active').css({"z-index": 8});
                    });
                }

                arr_e.first().css({"z-index": 9});
                setInterval(function () {
                    shownext();
                }, o.speed);
            });
        };
    </script>
    <div class="flash">
        <ul>
            <li><img src="<?=base_url()?>/images/hero-img9.jpg" style="width:1410px;height:450px"/></li>
            <li></li>
            <li></li>
        </ul>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.flash').imgtransition({
                speed: 3000,  //图片切换时间
                animate: 1500 //图片切换过渡时间
            });
        });
    </script>
</div>

<br><br>
<div class="fn-mall p">
    <div class="w1224">
        <div class="topH">
            <span class="icon_lr">/////////////////////////////////////////</span>
            <span class="topT">最新数据</span>
            <span class="icon_lr">/////////////////////////////////////////</span>
        </div>
        <div class="free p">
            <ul>
            	<?php foreach($latestdata as $item):?>
                <li>
                    <a target="_blank" href="getDetail?param=<?php echo $item['id']?>">
                        <div class="free_all">
                            <div class="free_img">
                                <img class="lazy-list" src="<?=base_url()?>picture/<?php echo $item['pic_url']?>" style="display: inline;">
                            </div>
                            <div class="free_name2"><?php echo $item['data_name']?></div>
                        </div>
                        <div class="price-tag">
                            <span class="free_now"><em>￥</em><?php echo $item['data_price']?></span>
                            <i></i>
                            <span class="from">浏览量<em><?php echo $item['number']?></em></span>
                        </div>
                    </a>
                </li>
                <?php endforeach;?>
            </ul>
        </div>
    </div>
</div>
<div class="fn-mall p ma-to-40">
    <div class="w1224">
        <div class="topH">
            <span class="icon_lr">/////////////////////////////////////////</span>
            <span class="topT">热门数据</span>
            <span class="icon_lr">/////////////////////////////////////////</span>
        </div>
        <div class="more">
            <div class="fl more-l">
                <img src="Picture/more_l.png" alt="精品数据">
            </div>
            <ul class="fr more-r">
            	<?php foreach($hotdata as $item):?>
                <li>
                    <div class="more_img">
                        <img class="lazy-list"
                             src="<?=base_url()?>picture/<?php echo $item['pic_url']?>" style="display: inline;">
                    </div>
                    <div class="more_name2"><?php echo $item['data_name']?></div>
                    <div class="price">
                        <span class="more_now"><em class="li_xfo">￥</em><em><?php echo $item['data_price']?></em></span>
                    </div>
                    <div class="more_info">
                        <p><?php echo $item['data_desc']?></p>
                        <a target="_blank" href="getDetail?param=<?php echo $item['id']?>">查看详情</a>
                    </div>
                </li> 
                <?php endforeach; ?>                 
            </ul>
        </div>
    </div>
</div>
<script>
    $(".more-r li").mouseenter(function(){
        $(this).find(".more_info").show();
        $(".more-r li").mouseleave(function(){
            $(this).find(".more_info").hide();
        });
    });
</script>
<div class="w1224 ma-to-40">
    <div class="topH">
        <span class="icon_lr">/////////////////////////////////////////</span>
        <span class="topT">精品数据</span>
        <span class="icon_lr">/////////////////////////////////////////</span>
    </div>
    <div class="nice">
        <ul>
        	<?php foreach($classicdata as $item):?>
            <li>
                <a href="javascript:;">
                    <div class="nice_xsall">
                        <div class="nice_img">
                            <a target="_blank" href="/packetinfo-66">
                                <img class="lazy-list" src="<?=base_url()?>picture/<?php echo $item['pic_url']?>" style="display: inline;">
                            </a>
                        </div>
                        <div class="nice_name2"><?php echo $item['data_name']?></div>
                        <div class="price">
                            <span class="nice_now"><em class="li_xfo">￥</em><em><?php echo $item['data_price']?></em></span>
                        </div>
                    </div>
                </a>
            </li>
        	<?php endforeach;?>
        </ul>
    </div>
</div>
<!-- <div class="goContact">
    <img src="Picture/contact.png" alt="客服">
</div>
<div class="contact_type">
    <div class="right-contact-us">
        <span class="phone">010-65916788</span>
    </div>
</div> -->
<div class="goTop">
    <img src="Picture/gotop.png" alt="返回顶部">
</div>
<script>
    var min_height = $(window).height();
    $(window).scroll(function () {
        var s = $(window).scrollTop();
        if (s > min_height) {
            $(".goTop").show();
        } else {
            $(".goTop").hide();
        }
        ;
    });
    $(".goTop").mouseenter(function () {
        $(this).find("img").attr("src", "/template/pc/rainbow/static/images/goTop_w.png");
        $(".goTop").click(function () {
            $("html,body").animate({scrollTop: 0}, 500);
        });
        $(".goTop").mouseleave(function () {
            $(this).find("img").attr("src", "/template/pc/rainbow/static/images/goTop.png");
        });
    });
    $(".goContact").mouseenter(function () {
        $(".contact_type").animate({width: "135px"}, 100);
        $(this).find("img").attr("src", "/template/pc/rainbow/static/images/contact_w.png");
        $(".goContact").mouseleave(function () {
            $(".contact_type").animate({width: "0px"}, 100);
            $(this).find("img").attr("src", "/template/pc/rainbow/static/images/contact.png");
        });
    });
</script>
<script>
    var footerT = min_height - 346;
    var bodyH = $("body").height();
    if (bodyH <= min_height) {
        $(".footer").css({
            position: 'absolute',
            top: footerT + 'px',
            bottom: 0,
            left: 0,
            right: 0
        });
    }
</script>

<script src="Scripts/lazyload.min.js" type="text/javascript" charset="utf-8"></script>
<script src="Scripts/headerfooter.js" type="text/javascript" charset="utf-8"></script>
<script src="Scripts/carousel.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function () {
        $('.categorys .dd').show(); //首页商品分类显示
        $(".carousel").carousel(); //轮播自动播放
    });

    //轮播图小圆点
    $(function () {
        var imgle = $("#myCarousel .carousel-inner .item").length;
        for (var i = 0; i < imgle; i++) {
            $('#myCarousel ol.carousel-indicators').append("<li data-target=" + "#myCarousel" + " data-slide-to=" + i + " class=" + "" + "></li>")
        }
        $('ol.carousel-indicators li:first').addClass('active');
    });

    //品牌logo
    $(function () {
        var op = 500;
        $('.tpshop2_0_brand ul li').hover(function () {
            if (!$(this).hasClass('b')) {
                $(this).stop().animate({
                    opacity: "1"
                }, op).siblings().stop().animate({
                    opacity: "0.5"
                }, op);
            }
        }, function () {
            if (!$(this).hasClass('b')) {
                $(this).stop().animate({
                    opacity: "1"
                }, op).siblings().stop().animate({
                    opacity: "1"
                }, op);
            }
        })
    })

    function showul(obj) {
        var fid = $(obj).attr('fid');
        var nky = $(obj).attr('rel');
        $('#floor' + fid).find('.content_goods_sh').hide();
        $('#floor' + fid).find('#wbg' + nky).show();
    }
</script>
</body>

</html>